;
; kernel_port_vectors.c
;
;  Created on: 18/02/2010
;  Author: gustavo
;

			INCLUDE portmacro.inc

			IMPORT vPortYieldProcessor

			EXPORT UndefInstrHndlr
			EXPORT SwiHndlr
			EXPORT PrefetchAbortHndlr
			EXPORT DataAbortHndlr
			EXPORT IrqHndlr
			EXPORT FiqHndlr

	AREA CODE, CODE, READONLY
    CODE32

UndefInstrHndlr
	B UndefInstrHndlr

SwiHndlr
	B vPortYieldProcessor

PrefetchAbortHndlr
	B PrefetchAbortHndlr

DataAbortHndlr
	B DataAbortHndlr

IrqHndlr
	portSAVE_CONTEXT					; Save the context of the current task.

	MOV    	r1,#0
	LDR    	r0,[r1,#-0x100]
	MOV    	lr,pc
	BX     	r0

	portRESTORE_CONTEXT					; Restore the context of the highest
										; priority task that is ready to run.

FiqHndlr
	B FiqHndlr

	END
